-- GENERATED SPELL FOR [Sunfury Astromancer] --


function spell0_19643(pUnit, Event) --@Astral Focus,n/a--
pUnit:FullCastSpellOnTarget(35914,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19643', 8000, 1)
end

function spell1_19643(pUnit, Event) --@Fiery Intellect,Self--
pUnit:FullCastSpellOnTarget(35917,pUnit)
pUnit:RegisterEvent('Sorts_19643', 623, 1)
end

function spell2_19643(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(38391,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19643', 1500, 1)
end

function Sorts_19643(pUnit, Event)
local choix_sorts_19643 = math.random(0, 2)
if choix_sorts_19643 == 0 then
pUnit:RegisterEvent('spell0_19643', 1, 1)
end
if choix_sorts_19643 == 1 then
pUnit:RegisterEvent('spell1_19643', 1, 1)
end
if choix_sorts_19643 == 2 then
pUnit:RegisterEvent('spell2_19643', 1, 1)
end
end

function mob19643_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19643', math.random(1500, 3000), 1)
end

function mob19643_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19643_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19643_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19643, 1, 'mob19643_Action')
RegisterUnitEvent(19643, 2, 'mob19643_Leave')
RegisterUnitEvent(19643, 3, 'mob19643_Kill')
RegisterUnitEvent(19643, 4, 'mob19643_Die')
